<head>
<script type="text/javascript" src="format-currency.js"></script>
</head>
<body>

<form name="form" method="post" action="#">
	<fieldset>
	<legend>FormatCurrency</legend>
	<label>2 casas</label>	
	<input type="text" name="a" />
	<label>3 casas</label>	
	<input type="text" name="b" />
	<label>6 casas</label>	
	<input type="text" name="c" />
	</fieldset>
</form>

<script type="text/javascript">
//<![CDATA[
	formatCurrency(document.forms.form.a, 2);
	formatCurrency(document.forms.form.b, 3, " ", "-");
	formatCurrency(document.forms.form.c, 6);
//]]>
</script>
